package com.zhejiangzhengyuan.municipal_common.entity.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Timestamp;

/**
 * @author lin_ju
 * Create on 2019/12/30
 */

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ActionTitle", description = "前端使用T")
public class ActionTitle {
    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "前端必需字段名API请求URL")
    private String title;


    @ApiModelProperty(value = "自我关联，存储父级ID")
    private String selfParentId;

    @ApiModelProperty(value = "API行为编码，可作为权限点")
    private String actionCode;

    @ApiModelProperty(value = "API名称")
    private String actionName;

    @ApiModelProperty(value = "API所在模块名称")
    private String moduleName;

    @ApiModelProperty(value = "API请求URL")
    private String patternUrl;

    @ApiModelProperty(value = "API描述")
    private String actionDesc;

    @ApiModelProperty(value = "记录创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;

    @ApiModelProperty(value = "记录更新时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    //excel工具类时间转译
    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    //指明字段名（value） 或 下标 （index） 二者只选一
    //excel导入导出功能  将时间改为Date
    @ExcelProperty(value = "记录更新时间")
    private Timestamp updateTime;
}
